package thirdwork;




/**
 * @author ：chenzikang
 * @date ： 2020/3/10
 */

public class ArrayData {
    public static void main(String[] args) {


        int[] arr = new int[10];
        System.out.print("数组为：");
        for (int i=0;i<arr.length;i++){
            double timp=Math.random()*100;
            int data=(int)timp;
            arr[i]=data;
            System.out.print(arr[i]+",");

        }
        int result=0;
        for (int i = 0; i < arr.length; i++) {
            for (int j = 1; j < i ; j++) {
                if (arr[i]==arr[j]){
                    result+=1;

                }
            }


        }
        System.out.println("\n"+"重复的数量为:"+result);


    }


}
